<html>
<head>
	<script>
	<? if($this->id == ''){?>
		common.setMainTitle('Add New Category');
	<? }else {?>
		common.setMainTitle('Edit Category');
	<? } ?>
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body style="background-color: transparent">
<form id="id-form" name="frm" id="frm" method="post" action="/admin/dealcategories/save">
    <input type="hidden" name="DEALCATEGORYID" value="<?=$this->id ?>" />
	<input type="hidden" name="PARENTID" value="<?=$this->parentID ?>" />
	<div name="breadcrum" class="breadcrum">
		<h3 style="height: 18px">
			<? if(!isset($this->data)){ 
					for($i=0;$i<sizeof($this->hierachy);$i++){
						echo $this->hierachy[$i]." >> ";
					}
				} else {
					for($i=0;$i<sizeof($this->hierachy)-1;$i++){
						echo $this->hierachy[$i]." >> ";
					}
					if(sizeof($this->hierachy)>0){
						echo $this->hierachy[$i]."::".$this->data->NAME;
					} else {
						echo $this->data->NAME;
					}
					
				}
			?>
		</h3>
	</div>
	<div id="input-form">
		<div class="header-bar">
			<div class="header-bar-left"></div>
			<div class="header-bar-center"></div>
			<div class="header-bar-right"></div>
		</div>
		<div class="content-frame">
			<table width="100%">
				<tr>
					<td class="content-frame-left"></td>
					<td class="content-frame-center">
						<table style="margin: 20px">
							<tbody>
								<tr>
									<td nowrap="nowrap">Name</td>
									<td><input class="" id="NAME" name ="NAME" value="<?=(isset($this->data->NAME)?$this->data->NAME:'')?>" type ="text" size ="50" maxlength="75">
									</td>
								</tr>
								<tr>
									<td nowrap="nowrap">Is Active</td>
									<td>
										<input type="checkbox" name="STATUS" id="STATUS" <?=(isset($this->data->STATUS) && $this->data->STATUS == "1" ? "checked=''":''); ?>/>
									</td>
								</tr>
								<tr>
									<td>
										<input type="submit" value="Save" />
										<input type="button" value="Cancel" onclick="javascript:history.go(-1)" />
									</td>
								</tr>  
							</tbody>		
						</table>
					</td>
					<td class="content-frame-right"></td>
				</tr>
				<tr>
					<td class="content-frame-left-corner"></td>
					<td class="content-frame-bottom"></td>
					<td class="content-frame-right-corner"></td>
				</tr>
			</table>
		</div>
	</div>
</form>
<script>
</script>
</body>
</html>